import React, { PropsWithChildren, useEffect } from 'react';
import Header from '@/pages/header';
import Left from '@/pages/main/left';
import styles from './index.less';
import { history } from 'umi';
interface IProps {}
const Layout: React.FC = (props: PropsWithChildren<IProps>) => {
  useEffect(() => {
    history.push('/sub1'); //页面刚进入默认到 sub1 页面下
  }, []);

  return (
    <div className={styles.container}>
      <Header />
      <main className={styles.main}>
        <Left />
        <div className={styles.right}>{props.children}</div>
      </main>
    </div>
  );
};

export default Layout;
